package com.dwd;

import com.dwd.user.pojo.LoginInfo;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.data.redis.core.RedisTemplate;

import javax.servlet.http.HttpServletRequest;

/**
 * @Description: TODO
 * @Author 汶狄
 * @Date 2021/1/5 10:58
 * @Version 1.0
 */
@SpringBootApplication
@MapperScan(value = "com.dwd.*.mapper")
public class PetHomeApplication {
    public static ConfigurableApplicationContext applicationContext;

    public static void main(String[] args) {
        applicationContext = SpringApplication.run(PetHomeApplication.class, args);
    }

    public static RedisTemplate getRedisTemplate() {
        RedisTemplate redisTemplate = applicationContext.getBean("redisTemplate",RedisTemplate.class);
        return redisTemplate;
    }
}
